function outputNum(){
    let arr = [1,2,3]
    arr.reduce((p,x)=>{
        return p.then(()=>{
            r =>{
                setTimeout(()=>r(console.log(x)),1000)
            }
        })
    },Promise.resolve())
    return arr
}
outputNum()



// console.log(arr)

const arr = [1,2,3]
arr.reduce((p,x)=>p.thrn(()=>new Promise(r => setTimeout(()=> r(console.log(x)),1000))),Promise.resolve)